<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Hello</title>
</head>
<body>
<div id="app">
    <input type="text" v-model="name">
    <br>
    <h1>
        {{name}} 非常帅
        有{{num}}位女神为他着迷。
    </h1>
    <input type="button" value="点我" v-on:click="clickMe">
    <br>
    {{num}}

</div>

<!-- let 设置带作用域的变量-->
<!--const 设置常量-->
<!--引入vue.js文件-->
<script src="./node_modules/vue/dist/vue.js"></script>
<script>

</script>

<script type="text/javascript">
    let app = new Vue({

        el: "#app",//el 即element
        data: {
            name: "哈士奇",
            num: 0
        },
        /*methods-->对象*/
        methods: {
            clickMe() {

                console.log(this.num++);
            }
        }

    })


</script>

</body>
</html>